package com.dotflat.vod.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Entity
@Table(name = "op_vod_item")
@Data
@EqualsAndHashCode(callSuper = true)
public class OPVodItem extends AreableObjectBase {

	@Column(columnDefinition = "longtext  COMMENT '标题'")
	private String title = "";

	@Column(columnDefinition = "longtext  COMMENT '可能的内容'")
	private String content="";

	@Column( name = "static_url", columnDefinition = "varchar(512) COMMENT '持久化文件'")
	private String staticUrl;

	@Column(columnDefinition = "varchar(512) COMMENT '封面'")
	private String cover;

	@Column(columnDefinition = " bit(1) DEFAULT 0 COMMENT '生效' ", nullable = false)
	public Integer valid = 1;

	@Column(columnDefinition = "varchar(32)  COMMENT '分类id'")
	public String categoryId;

	@ManyToOne
	@JoinColumn(name = "categoryId", columnDefinition = "varchar(64) COMMENT '分类id'", insertable = false, updatable = false)
	private OPVodCategory category;

}
